package com.cloudkinto.service.shipprice;

import com.cloudkinto.entity.OrderOutputProductDo;
import com.cloudkinto.entity.ShipPriceDo;
import com.baomidou.mybatisplus.extension.service.IService;

import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.service.shipprice.vo.ComputePriceReq;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  service接口
 * </p>
 * @author ding
 * @since 2020-06-09
 */
public interface ShipPriceService extends IService<ShipPriceDo> {

    /**
     * @param stateId
     * @param weight
     * @param size
     * @param storageId
     * @param version
     * @return
     */
    List<ShipPriceDo> queryByRegionAndSize(Long stateId, double weight, double size, Long storageId, int version);

    /**
     * @param postCode
     * @param weight
     * @param size
     * @param storageId
     * @param version
     * @return
     */
    List<ShipPriceDo> queryByRegionAndSize(String postCode, double weight, double size, Long storageId, int version);

    List<ShipPriceDo> queryByRegionAndSize(Long stateId, double weight, double size, Long storageId, Long trackId, int version);

    SingleResult computePrice(ComputePriceReq req, Long userId, Long companyId);

    SingleResult computeInit();

    double[] getMulitSkuSize(List<OrderOutputProductDo> packageDetail);

    int getMulitSkuOperationFee(List<OrderOutputProductDo> packageDetail, String companyId);

    int getSameSkuOperationFee(Long productId, int count, String companyId);

    double[] countSameSkuSize(Long productId, int count);

    double[] countSameSkuSize(double[] finalSize, Long productId, int count);

    double[] countSameSkuSizeNew(double[] finalSize, Long productId, int count);

    double[] getSizeOrderDesc(double width, double height, double length);
}
